Add FTPS with SSL/TLS configuration#1516
Closed
YasanPunch wants to merge 68 commits intoballerina-platform:masterfrom
Closed
Add FTPS with SSL/TLS configuration#1516YasanPunch wants to merge 68 commits intoballerina-platform:masterfrom
YasanPunch wants to merge 68 commits intoballerina-platform:masterfrom
Conversation
…nd SSL/TLS certificate handling.
niveathika
reviewed
Dec 8, 2025
… 990 for IMPLICIT FTPS if unspecified. Improved KeyStore loading from Ballerina records and error handling for secure socket configurations.
…improved error handling for KeyStore loading, and added documentation regarding the limitations of hostname verification support in the current version of Apache Commons VFS2.
Codecov Report❌ Patch coverage is ❌ Your project status has failed because the head coverage (19.01%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## master #1516 +/- ##
=============================================
- Coverage 81.17% 19.01% -62.17%
+ Complexity 509 243 -266
=============================================
Files 40 55 +15
Lines 2561 3518 +957
Branches 407 622 +215
=============================================
- Hits 2079 669 -1410
- Misses 319 2746 +2427
+ Partials 163 103 -60 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…r implementations, as it is not supported by the current version of Apache Commons VFS2. Clean up related code and constants.
… 990 for IMPLICIT FTPS if unspecified. Improved KeyStore loading from Ballerina records and error handling for secure socket configurations.
…improved error handling for KeyStore loading, and added documentation regarding the limitations of hostname verification support.
…r implementations, as it is not supported by the current version of Apache Commons VFS2. Clean up related code and constants.
… configuration - Introduced tests for FTPS client operations including explicit and implicit modes, file handling, and error scenarios. - Added tests for FTPS listener functionality, ensuring correct event handling for file changes. - Improved error handling for secure socket configurations in both client and server implementations. - Updated mock server utilities to include FTPS server initialization for testing purposes.
… relevant files for consistency, , remove hardcoded credentials and enhance password handling for improved security.
- Refactored test structure for better isolation and clarity. - Introduced helper functions for state management and event handling. - Improved file handling in tests, ensuring robust cleanup and setup. - Updated mock server utilities to ensure isolated test environments for FTPS operations.
…ments - Introduced a new configuration for testing the default port logic, ensuring that port 21 is correctly swapped to 990 for implicit mode. - Added a cleanup function to manage test environment state after execution. - Enhanced existing test cases to validate the new configuration and ensure robust error handling during FTPS operations.
- Updated the FTPS client test to use a more descriptive variable name for error handling. - Increased the wait count in listener tests to ensure proper event detection. - Improved error message clarity for invalid truststore scenarios in tests. - Adjusted the FtpClient to default to port 990 when port 21 is specified for implicit FTPS mode.
…ing age filtering and timeout handling.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Purpose
Fixes: ballerina-platform/ballerina-library/#8489
Adds FTPS (FTP over SSL/TLS) support to the FTP module, enabling secure file transfers using SSL/TLS certificates.
Changes:
Added FTPS protocol option to the Protocol enum
Added SecureSocket configuration type for FTPS SSL/TLS settings
Added FtpsMode enum to support IMPLICIT and EXPLICIT FTPS modes
(Current) Usage Example:
Future Enhancements (TODO):
Checklist